package com.lld.service.impl;

import com.lld.dao.UserDao;
import com.lld.entity.User;
import com.lld.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: memo
 * @description: 用户业务处理类
 * @author: lld
 * @create: 2020-10-09 21:15
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public User login(String username, String password) {
        return userDao.queryByNamePwd(username, password);
    }

    @Override
    public void register(User user) {
        userDao.addUser(user);
    }
}
